#
# Be sure to run `pod lib lint WeexPluginLoader.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'WeexPluginLoader'
  s.version          = '0.0.6'
  s.summary          = 'Weex Plugin Loader.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: 替换GitHub的WeexPluginLoader ，自己进行实现.
                       DESC

  s.homepage         = 'http://git.evun.cn/ADMP-repository/iOS-WeexPluginLoader'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'shuaishuai' => '957715883@qq.com' }
  
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '9.0'
  s.requires_arc = true
  s.static_framework = true

#if ENV['mode'].to_s.include? "WeexPluginLoader"
    #使用zip成果物模式
    puts "WeexPluginLoader成果物模式集成".blue
    s.source           = { :http => 'https://geely-admp-oss.oss-cn-hangzhou.aliyuncs.com/sweet-app-release/ios/WeexPluginLoader.framework-0.0.6.zip' }
    s.ios.vendored_framework   = 'WeexPluginLoader.framework'
    s.source_files = 'WeexPluginLoader.framework/**/*.h'
    s.public_header_files = 'WeexPluginLoader.framework/**/*.h'

#else
#    #目前默认源码集成
#    puts "WeexPluginLoader源码模式集成".yellow
#    s.source           = { :git => 'https://gitlab.geely.com/p-admp/ios-common-kit/ios-weexpluginloader.git', :tag => s.version.to_s }
#    s.public_header_files  = 'WeexPluginLoader/Classes/**/*.h'
#    s.source_files = 'WeexPluginLoader/Classes/**/*.{h,m,mm}'
#end

  
  s.dependency "WeexSDK"
  
  s.pod_target_xcconfig  = {
    'FRAMEWORK_SEARCH_PATHS'        => '$(inherited) ${PODS_ROOT}/**',
    'LIBRARY_SEARCH_PATHS'          => '$(inherited) ${PODS_ROOT}/**',
    'ENABLE_BITCODE'                => 'NO',
    'OTHER_LDFLAGS'                 => '$(inherited) -ObjC',
    'STRINGS_FILE_OUTPUT_ENCODING'  => 'UTF-8',
    'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'
  }
end
